package vip.hello520.mapper;

import vip.hello520.model.UserPo;

import java.util.Set;

public interface LoginMapper {

    /**
     * 用于shiro验证用户
     *
     * @param name
     * @return
     */
    UserPo getUserByName(String name) throws Exception;

    /**
     * 用于shiro获取用户角色
     *
     * @param userId
     * @return
     * @throws Exception
     */
    Set<String> getRoleListByUserId(Integer userId) throws Exception;

    /**
     * 用于shiro获取权限
     *
     * @param userId
     * @return
     * @throws Exception
     */
    Set<String> getPowerListByUserId(Integer userId) throws Exception;

}